package day7;

/**
 * @author oldliu
 * @since 1.0
 */
public class Zhishu10000 {
    public static void main(String[] args) {
        //10000大的十个质数
        int count = 0;
        int start = 10000;

        System.out.println("开始计算：");
        shoubao:
        while (true) {
            //做法待改进，只是为了演示break
            for (int i = 2; i < start; i++) {
                if (start % i == 0) {
                    break;
                }
                if (i == start - 1) {
                    System.out.println(start);
                    count++;
                    if (count >= 10) {
                        System.out.println("凑齐10个了，结束");
                        break shoubao;
                    }
                }
            }
            start++;
        }

        System.out.println("over..........");
    }
}
